package com.zhuoyue.biz.core.api.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhuoyue.biz.core.api.domain.base.BaseDoClass;

import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 设备状态
 *
 * @author Administrator
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "`tbl_infrared_device_actions`")
public class InfraredDeviceActions extends BaseDoClass implements Serializable {
    public static final String COL_ID = "id";
    public static final String COL_INFRARED_DEVICE_ID = "infrared_device_id";
    public static final String COL_ACTIONS_KEY = "actions_key";
    public static final String COL_ACTIONS_VALUE = "actions_value";
    public static final String COL_CREATE_TIME = "create_time";
    public static final String COL_MODIFY_TIME = "modify_time";
    /**
     * 设备ID
     */
    @TableField(value = "`infrared_device_id`")
    private String infraredDeviceId;

    /**
     * 键
     */
    @TableField(value = "`actions_key`")
    private String actionsKey;

    /**
     * 值
     */
    @TableField(value = "`actions_value`")
    private String actionsValue;

    private static final long serialVersionUID = 1L;

    /**
     * 保存action信息
     *
     * @param infraredDeviceId
     * @param actionsKey
     * @param actionsValue
     * @return
     */
    public InfraredDeviceActions saveInfraredAction(String infraredDeviceId, String actionsKey, String actionsValue) {
        this.infraredDeviceId = infraredDeviceId;
        this.actionsKey = actionsKey;
        this.actionsValue = actionsValue;
        return this;
    }
}